<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" /> 
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script language="javascript">
function sendemail(type,emailtype,emailtpl,dayslimit){
	var sort=1;
	var pytoken=$("input[name='pytoken']").val();
	var i=layer.load('执行中，请稍候...',0);
	$.post('index.php?m=email&c=sendPromotion',{type:type,emailtype:emailtype,emailtpl:emailtpl,dayslimit:dayslimit,sort:sort,pytoken:pytoken},function(data){
		layer.close(i);
 		var data=JSON.parse(data);
		var status=data.status;
		if(status==0){
			layer.msg(data.msg,2,8);return false;
		}else if(status==1){
			layer.msg(data.msg,2,9,function(){location.reload();});
		} 
	})
}
$(document).ready(function(){ 
	
	$.get('index.php?m=email&c=getBirthday&type=email',{},function(data){
		
		var num=eval('('+data+')');
		$('#birthday').html(num.birthday_e);
		if(num.birthday_e==0){
			$("#bpost").attr("disabled",true);
			$("#bpost").attr("class","admin_unclick");
		}
		$('#anniversary').html(num.anniversary_e);
		if(parseInt(num.anniversary_e)==0){
			$("#apost").attr("disabled",true);
			$("#apost").attr("class","admin_unclick");
		}
		$('#todaydue').html(num.todaydue_e);
		if(num.todaydue_e==0){
			$("#tpost").attr("disabled",true);
			$("#tpost").attr("class","admin_unclick");
		} 
		$('#sevendue').html(num.sevendue_e);
		if(num.sevendue_e==0){
			$("#spost").attr("disabled",true);
			$("#spost").attr("class","admin_unclick");
		}
		$('#useradd').html(num.useradd_e);
		if(num.useradd_e==0){
			$("#useraddpost").attr("disabled",true);
			$("#useraddpost").attr("class","admin_unclick");
		}
		$('#userup').html(num.userup_e);
		if(num.userup_e==0){
			$("#useruppost").attr("disabled",true);
			$("#useruppost").attr("class","admin_unclick");
		}
		$('#addjob').html(num.addjob_e);
		if(num.addjob_e==0){
			$("#addjobpost").attr("disabled",true);
			$("#addjobpost").attr("class","admin_unclick");
		}
		$('#upjob').html(num.upjob_e);
		if(num.upjob_e==0){
			$("#upjobpost").attr("disabled",true);
			$("#upjobpost").attr("class","admin_unclick");
		}
	});
	
});
</script>
<title>后台管理</title>
</head>
<body class="body_ifm">
<div class="infoboxp">
<div class="tabs_info">
    <ul>
      <li {yun:}if $smarty.get.c==''{/yun}class="curr"{yun:}/if{/yun}><a  href="index.php?m=email">邮件推广</a></li>
      <li {yun:}if $smarty.get.c=='msgtg'{/yun}class="curr"{yun:}/if{/yun}><a href="index.php?m=email&c=msgtg">短信推广</a></li>
      <li {yun:}if $smarty.get.c=='tgresume'{/yun}class="curr"{yun:}/if{/yun} ><a href="index.php?m=email&c=tgresume">简历推广</a></li>
      <li {yun:}if $smarty.get.c=='tgjob'{/yun}class="curr"{yun:}/if{/yun} > <a href="index.php?m=email&c=tgjob">职位推广</a></li>
      <li {yun:}if $smarty.get.c=='email'{/yun}class="curr"{yun:}/if{/yun} ><a href="index.php?m=email&c=email">自定义邮件</a> </li>
      <li{yun:}if $smarty.get.c=='msg'{/yun}class="curr"{yun:}/if{/yun}><a  href="index.php?m=email&c=msg">自定义短信</a></li>
    </ul>
  </div>
  <div class="clear"></div>
  <div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
    <div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
    <div class="admin_new_tip_list_cont">
      <div class="admin_new_tip_list">发送短信时，请选择合适的时间进行发送</div>
    </div>
  </div>
  <div class="clear"></div>
  <div class="tag_box mt10">
	<table width="100%" class="table_form ">
       <tr >
       <tbody>
        <th bgcolor="#f0f6fb" colspan="2" ><span class="admin_bold">邮件推广</span></th>
       </tbody>
      </tr 
       ><tr>
        <th width="310">今天过生日的用户:</th>
        <td><div class="admin_msgtg_f">符合用户数：<font color="red" id="birthday">0</font> 位 {yun:}if $birthday.ctime{/yun}，上次发送时间：<font color="red">{yun:}$birthday.ctime|date_format:"%Y-%m-%d"{/yun}</font>{yun:}/if{/yun}。</div><input class="{yun:}if $birthday.disabled==1{/yun}admin_unclick{yun:}else{/yun}admin_button{yun:}/if{/yun}" type="submit" id="bpost" onclick="sendemail('1','1','1')" value="&nbsp;发送邮件&nbsp;"  {yun:}if $birthday.disabled==1{/yun}disabled="disabled"{yun:}/if{/yun}/></td>
      </tr>
      <tr>
        <th>周年提醒（所有用户）:</th>
        <td><div class="admin_msgtg_f">符合用户数：<font color="red" id="anniversary">0</font> 位{yun:}if $anniversary.ctime{/yun}，上次发送时间：<font color="red">{yun:}$anniversary.ctime|date_format:"%Y-%m-%d"{/yun}</font>{yun:}/if{/yun}。</div><input class="{yun:}if $anniversary.disabled==1{/yun}admin_unclick{yun:}else{/yun}admin_button{yun:}/if{/yun}" type="submit" id="apost" onclick="sendemail('2','2','1')" value="&nbsp;发送邮件&nbsp;"  {yun:}if $anniversary.disabled==1{/yun}disabled="disabled"{yun:}/if{/yun}/></td>
      </tr>
      <tr>
        <th>今日会员到期提醒（企业用户）:</th>
        <td><div class="admin_msgtg_f">符合用户数：<font color="red" id="todaydue">0</font> 位{yun:}if $todaydue.ctime{/yun}，上次发送时间：<font color="red">{yun:}$todaydue.ctime|date_format:"%Y-%m-%d"{/yun}</font>{yun:}/if{/yun}。</div><input class="{yun:}if $todaydue.disabled==1{/yun}admin_unclick{yun:}else{/yun}admin_button{yun:}/if{/yun}" type="submit" id="tpost" onclick="sendemail('1','3','1','1')" value="&nbsp;发送邮件&nbsp;"  {yun:}if $todaydue.disabled==1{/yun}disabled="disabled"{yun:}/if{/yun}/></td>
      </tr>
      <tr>
        <th>7日会员到期提醒（企业用户）:</th>
        <td><div class="admin_msgtg_f">符合用户数：<font color="red" id="sevendue">0</font> 位{yun:}if $sevendue.ctime{/yun}，上次发送时间：<font color="red">{yun:}$sevendue.ctime|date_format:"%Y-%m-%d"{/yun}</font>{yun:}/if{/yun}。</div><input class="{yun:}if $sevendue.disabled==1{/yun}admin_unclick{yun:}else{/yun}admin_button{yun:}/if{/yun}" type="submit" id="spost" onclick="sendemail('1','3','1','7')" value="&nbsp;发送邮件&nbsp;"  {yun:}if $sevendue.disabled==1{/yun}disabled="disabled"{yun:}/if{/yun}/></td>
      </tr>
      
	 <tr>
        <th >注册后7日内未发布简历（个人用户）:</th>
        <td><div class="admin_msgtg_f">符合用户数：<font color="red" id="useradd">0</font> 位{yun:}if $useradd.ctime{/yun}，上次发送时间：<font color="red">{yun:}$useradd.ctime|date_format:"%Y-%m-%d"{/yun}</font>{yun:}/if{/yun}。</div><input class="{yun:}if $useradd.disabled==1{/yun}admin_unclick{yun:}else{/yun}admin_button{yun:}/if{/yun}" type="submit" id="useraddpost" onclick="sendemail('1','4','1','7')" value="&nbsp;发送邮件&nbsp;"  {yun:}if $useradd.disabled==1{/yun}disabled="disabled"{yun:}/if{/yun}/></td>
      </tr>
      <tr>
        <th>7日未刷新简历（个人用户）:</th>
        <td><div class="admin_msgtg_f">符合用户数：<font color="red" id="userup">0</font> 位{yun:}if $userup.ctime{/yun}，上次发送时间：<font color="red">{yun:}$userup.ctime|date_format:"%Y-%m-%d"{/yun}</font>{yun:}/if{/yun}。</div><input class="{yun:}if $userup.disabled==1{/yun}admin_unclick{yun:}else{/yun}admin_button{yun:}/if{/yun}" type="submit" id="useruppost" onclick="sendemail('1','5','1','7')" value="&nbsp;发送邮件&nbsp;"  {yun:}if $userup.disabled==1{/yun}disabled="disabled"{yun:}/if{/yun}/></td>
      </tr>
      <tr>
        <th>7日未发布职位（企业用户）</th>
        <td><div class="admin_msgtg_f">符合用户数：<font color="red" id="addjob">0</font> 位{yun:}if $addjob.ctime{/yun}，上次发送时间：<font color="red">{yun:}$addjob.ctime|date_format:"%Y-%m-%d"{/yun}</font>{yun:}/if{/yun}。</div><input class="{yun:}if $addjob.disabled==1{/yun}admin_unclick{yun:}else{/yun}admin_button{yun:}/if{/yun}" type="submit" id="addjobpost" onclick="sendemail('2','6','1','7')" value="&nbsp;发送邮件&nbsp;"  {yun:}if $addjob.disabled==1{/yun}disabled="disabled"{yun:}/if{/yun}/></td>
      </tr>
      <tr>
        <th >7日未刷新职位（企业用户）</th>
        <td><div class="admin_msgtg_f">符合用户数：<font color="red" id="upjob">0</font> 位{yun:}if $upjob.ctime{/yun}，上次发送时间：<font color="red">{yun:}$upjob.ctime|date_format:"%Y-%m-%d"{/yun}</font>{yun:}/if{/yun}。</div><input class="{yun:}if $upjob.disabled==1{/yun}admin_unclick{yun:}else{/yun}admin_button{yun:}/if{/yun}" type="submit" id="upjobpsot" onclick="sendemail('2','7','1','7')" value="&nbsp;发送邮件&nbsp;"  {yun:}if $upjob.disabled==1{/yun}disabled="disabled"{yun:}/if{/yun}/></td>
      </tr>


		
	</table>
	<input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
</div>
</div>
</body>
</html>